package com.laijiale.constant;

import io.swagger.v3.oas.models.security.SecurityScheme;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;

import java.util.Arrays;
import java.util.List;
import java.util.Objects;

/**
 * @author laijiale
 * @date 2024年12月22日 9:21
 */

public class ML {
    public interface Redis{
        /** 手机登录的验证码前缀 **/
        String VCODE_PREFIX="vcode:";
    }

    public interface Minio{
        /** 桶名 **/
        String BUCKET_NAME="mylesson";
        /** 头像目录**/
        String AVATAR_DIR="avatar";
        /** 课程封面目录 **/
        String COURSE_COVER_DIR="course-cover";
        String COURSE_SUMMARY_DIR="course-summary";
        String EPISODE_VIDEO_COVER_DIR="episode-video-cover";
        String EPISODE_VIDEO_DIR="episode-video";
        String BANNER_DIR="banner";
    }
    public interface Banner{
        /** 横幅默认图片**/
        String DEFAULT_BANNER="default-banner.jpg";
    }
    public interface Order{
        /** 订单状态 0未付款，1已付款，2已取消，3其他**/
        Integer UNPAID=0,PAID=1,CANCEL=2,OTHER_STATE=3;
        /** 支付方式 0未付款，1微信，2支付宝，3其他**/
        Integer NO_PAY=0,WECHAT_PAY=1,ALI_PAY=2,OTHER_PAY=3;
        String EXCEL_FILE_NAME ="订单统计表.xlsx",EXCEL_SHEET_NAME="sheet001";
        static String statusFormat(Integer statusCode){
            if (Objects.equals(statusCode,UNPAID)) return "未付款";
            if (Objects.equals(statusCode,PAID)) return "已付款";
            if (Objects.equals(statusCode,CANCEL)) return "已取消";
            if (Objects.equals(statusCode,OTHER_STATE)) return "其他";
            return "异常";
        }

        static String payTypeFormat(Integer payTypeCode){
            if (Objects.equals(payTypeCode,NO_PAY)) return "未支付";
            if (Objects.equals(payTypeCode,WECHAT_PAY)) return "微信";
            if (Objects.equals(payTypeCode,ALI_PAY)) return "支付宝";
            if (Objects.equals(payTypeCode,OTHER_PAY)) return "其他";
            return "异常";
    } }
    public interface Course{
        String DEFAULT_SUMMARY="default-course-summary.jpg";
        String DEFAULT_COVER="default-course-cover.jpg";

    }
    public interface Episode{
        String DEFAULT_VIDEO="default-episode-video.mp4";
        String DEFAULT_VIDEO_COVER="default-episode-video-cover.jpg";
        /** 报表相关，报表名称，Sheet名称**/
        String EXCEL_FILE_NAME="视频集统计表.xlsx",EXCEL_SHEET_NAME="sheet001";
    }

    public interface User{
        //男1女0保密2
        Integer FEMALE=0,MALE=1,SECRET=2;
        /** 报表相关，报表名称，Sheet名称**/
        String EXCEL_FILE_NAME="用户统计表.xlsx",EXCEL_SHEET_NAME="sheet001";
        //默认密码
        String DEFAULT_PASSWORD="123456789";
        List<String> DEFAULT_AVATARS= Arrays.asList(
                "mouse.png","cow.png","tiger.png","rabbit.png","dragon.png",
                "snake.png","horse.png","sheep.png","monkey.png","chicken.png","dog.png","pig.png"
        );
        static String genderFormat(Integer genderCode) {
            if (Objects.equals(genderCode, FEMALE)) return "女孩";
            if (Objects.equals(genderCode, MALE)) return "男孩";
            if (Objects.equals(genderCode, SECRET)) return "保密";
            return "异常";
        }

        }
        public interface Menu{
            Long ROOT_ID=0L;
        }
        public interface Seckill{
            /** 秒杀活动未开始0，已开始1，已结束2*/
            Integer NOT_START=0,START=1,ENDED=2;
        }





}
